package com.gg.ggw.repository;

import com.gg.ggw.model.GgArticle;
import com.gg.ggw.model.GgUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * Created by Administrator on 2016/12/6.
 */
public interface UserRepository extends JpaRepository<GgUser,Long> {

    @Query("from GgUser u where u.nickname=:nickname")
    GgUser findUser(@Param("nickname") String name);
}
